package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.ArrayList;

/**
 * Created by varoske on 3/5/14.
 */
public class MenuChooser {
    private ArrayList<String> menuOptions = new ArrayList<String>();

    public MenuChooser(){
        menuOptions.add("List Books");
    }


    public void listMenuOptions(PrintStream printStream) {
        System.out.println("Choose an option by typing a number:");
        printStream.println(menuOptions);
    }

    public String parseInput(BufferedReader bufferedReader) {

        int output= 0;

        try {
            String input= bufferedReader.readLine();
            output= Integer.parseInt(input);
            output--;

        } catch (IOException e) {
            e.printStackTrace();
        }

        return menuOptions.get(output);
    }
}
